import {HTTP} from '../util/http'

class Service extends HTTP {
    serviceCategory(params = {}, success) {
        let url = 'service/category'
        let data = Object.assign({},
            params
        )
        this.request({
            url: url,
            data: data,
            success
        })
    }

    servicePublishPost(params = {}, success,fail) {
        let url = 'service/publish'
        let data = Object.assign({},
            params,
            {})
        this.request({
            url: url,
            method: 'POST',
            data: data,
            urlData: {
                userId: wx.getStorageSync('userInfo').user_id
            },
            success,
            fail
        })
    }

    serviceDetail(params = {}, success) {
        let url = 'service/detail'
        let data = Object.assign({},
            params,
        )
        this.request({
            url: url,
            data: data,
            success
        })
    }
}

export {Service}